<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text" th:value="${op}" id="staff_name2" readonly/>

<th:block th:include="include :: footer"/>

<script th:inline="javascript">
    var staff_name2=[[${op}]];
    alert(staff_name2)
</script>

</body>

</html>